<?php
class Admin_Form_Mail extends Zend_Form
{
    public function init()
    {
        $this->setName("admin");

        $id = new Zend_Form_Element_Hidden('id');        
        
        $task = new Zend_Form_Element_Text('task');
        $task->setLabel('Tác vụ (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        $task->setAttrib('size', 60)->setAttrib('readonly','readonly');
        
        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('Bộ phận / Phòng ban gởi (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        $name->setAttrib('size', 60);
        
        $subj = new Zend_Form_Element_Text('subject');
        $subj->setLabel('Tiêu đề (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        $subj->setAttrib('size', 60);                        
        
        $content = new Zend_Form_Element_Textarea('content');
        $content->setLabel('Nội dung (*)')->setRequired(true)->addValidator('NotEmpty');
        $content->setAttrib('size', 60);
        
        $cmt = new Zend_Form_Element_Textarea('comment');
        $cmt->setLabel('Cái khung này dùng cho lập trình viên chỉnh sửa (*)')->setRequired(true)->addValidator('NotEmpty');
        $cmt->setAttrib('size', 60);
        
        // submit button
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id','submitbutton');
        $submit->setAttrib('class',"button medium");
                
        // add elements to form
        $this->addElements(array (
            $id, $task, $name, $subj, $content, $submit//, $cmt
        ));
    }
}

